package com.ldk.config;

import com.ldk.domain.Car;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

import java.math.BigDecimal;

@Configuration
public class MyconfigProfile {

    @Profile("test")
    @Bean("baomaCar")
    public Car car(){
        Car car = new Car();
        car.setBrand("baoma");
        car.setPrice(new BigDecimal(23));
        return car;
    }

    @Profile("dev")
    @Bean("benchiCar")
    public Car car2(){
        Car car = new Car();
        car.setBrand("benchi");
        car.setPrice(new BigDecimal(23));
        return car;
    }



}
